#coding:utf-8

from socket import *

c = socket(AF_INET, SOCK_STREAM)
c.connect(("127.0.0.1",9999))
while True:
	cmd = raw_input("> ")
	c.send(cmd)
	if cmd == "exit":
		
		c.close()
		break
	data = c.recv(1024)
	print data


